import java.io.Serializable;

/**
 * Represents a river landmark. These are different from a normal landmark in
 * that the party must choose a method of crossing the river, each with its own
 * hazards.
 */
public class River extends Landmark implements Serializable{

	private int riverDepthMin;
	private int riverDepthMax;
	private boolean hasFerry;
		
	/**
	 * Creates a river.
	 * 
	 * @param name Name of the river
	 * @param hasStore Boolean value of whether or not the river crossing location has a store
	 * @param riverDepthMin Minimum river depth at this landmark.
	 * @param riverDepthMax Maximum river depth at this landmark.
	 * @param hasFerry Whether or not the landmark has a ferry for the river.
	 */
	public River(String name, boolean hasStore, int riverDepthMin,	
			int riverDepthMax, boolean hasFerry, int distToNextLandmark,
			int map_x_coord, int map_y_coord) {
		super(name, hasStore, distToNextLandmark, map_x_coord, map_y_coord);
		this.riverDepthMin = riverDepthMin;
		this.riverDepthMax = riverDepthMax;
		this.hasFerry = hasFerry;
	}
	
	
	/**
	 * Accessor for the riverDepthMin field.
	 * @return int value of the minimum river depth at this landmark
	 */
	public int getRiverDepthMin() 
	{
		return riverDepthMin;
	}

	/**
	 * Accessor for the riverDepthMax field.
	 * @return int value of the maximum river depth at this landmark
	 */
	public int getRiverDepthMax() 
	{
		return riverDepthMax;
	}
	
	
	/**
     * Returns the current river depth.
     * @return int value of the current river depth
     */
    public int getRiverDepth(){
        //FIXME change to generate random riverdepth between min and max
        //if user selects "wait" on riverPanel screen instead of ford/ferry/float,
        // generate a new random number slightly higher or lower than current depth.
        //  Returning riverDepthMax right now as placeholder.
            return riverDepthMax;
    }
	
	
	/**
	 * Accessor for the hasFerry field
	 * @return boolean value of whether or not there is a ferry at this landmark
	 */	
	public boolean hasFerry()
	{
		return hasFerry;
	}
}
